<template>
  <el-row :gutter="10">
    <el-col :xs="0" :sm="24" :md="24" :lg="24" :xl="24">
      <el-menu :default-active="1" class="el-menu-demo" mode="horizontal">
        <el-menu-item index="1"><router-link to="/index">首页</router-link></el-menu-item>
        <el-menu-item index="2"><router-link to="/module">模组</router-link></el-menu-item>
        <el-menu-item index="3"><router-link to="/room">房间</router-link></el-menu-item>
        <el-menu-item index="4"><router-link to="/home">个人主页</router-link></el-menu-item>
        <el-menu-item index="5" @click="cancel">注销/登录/注册</el-menu-item>
      </el-menu>
    </el-col>
    <el-col :xs="24" :sm="0" :md="0" :lg="0" :xl="0">
      <el-menu :default-active="1" class="el-menu-demo" mode="horizontal">
        <el-submenu index="0">
          <template slot="title">菜单</template>
          <el-menu-item index="1"><router-link to="/index">首页</router-link></el-menu-item>
          <el-menu-item index="2"><router-link to="/module">模组</router-link></el-menu-item>
          <el-menu-item index="3"><router-link to="/room">房间</router-link></el-menu-item>
          <el-menu-item index="4"><router-link to="/home">个人主页</router-link></el-menu-item>
          <el-menu-item index="5" @click="cancel">注销/登录/注册</el-menu-item>
        </el-submenu>
      </el-menu>
    </el-col>
  </el-row>
</template>

<script>
import 'bootstrap'
import 'jquery'
export default {
  name:'Header',
  data(){
    return{

    };
  },
  methods: {
    cancel(){
      sessionStorage.clear();
      this.$router.push('/');
    }
  }
}
</script>

<style scoped>
a{
  text-decoration: none;
}

.router-link-active{
  text-decoration: none;
}
</style>
